<html>
<head>
<title>图片上传组件</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="swfupload/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="swfupload/swfupload.js"></script>
<script type="text/javascript" src="swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="swfupload/js/fileprogress.js"></script>
<script type="text/javascript" src="swfupload/js/handlers.js"></script>
<script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>

<script type="text/javascript">
		var swfu;

		window.onload = function() {
			var settings = {
				flash_url : "swfupload/swfupload.swf",
				flash9_url : "swfupload/swfupload_fp9.swf",
				upload_url: "images_add_upload_do.php",
				file_size_limit : "2MB",
				file_types : "*.png;*.jpg;",
				file_types_description : "Image Files",
				file_upload_limit : 30,
				file_queue_limit : 0,
				custom_settings : {
					progressTarget : "fsUploadProgress"
				},

				file_post_name : "Filedata",
				debug: false,

				// Button settings
				button_image_url: "swfupload/images/upload.png",
				button_width: "70",
				button_height: "22",
				button_placeholder_id: "spanButtonPlaceHolder",
				button_text: '<span class="theFont">上传图片</span>',
				button_text_style: ".theFont { font-size: 14; }",
				button_text_left_padding: 5,
				button_text_top_padding: 1,
				
				// The event handler functions are defined in handlers.js
				swfupload_preload_handler : preLoad,
				swfupload_load_failed_handler : loadFailed,
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete	// Queue plugin event
			};

			swfu = new SWFUpload(settings);
	     };
	</script>
<style type="text/css">
html, textarea, input { font-size:12px; font-family:Arial, Helvetica, sans-serif, 宋体; overflow:hidden; 
}

.delete {
    background: url("swfupload/images/closeyes.gif") no-repeat scroll 0 0 transparent;
    display: none;
    height: 12px;
    line-height: 100px;
    overflow: hidden;
    position: absolute;
    right: 3px;
    top: 3px;
    width: 13px;
    z-index: 999;
}

.delete:hover {
    background: url("swfupload/images/close-hover.gif") no-repeat scroll 0 0 transparent;
}


.imgDesc {
	position: absolute;
	left:150px;
	height: 80px; 
	width: 632px;
}
</style>
</head>
<body>
<div>
	<!-- <form id="form1" action="index.php" method="post" enctype="multipart/form-data"> -->
			<div style="float:left;">
				<span id="spanButtonPlaceHolder"></span>
			</div>
			<div style="float:left;margin-left:10px;" id="divStatus"></div>
			<div style="clear:both;"></div>
			<div  id="thumbImages"></div>
			<button id="btn">点我</button>
	<!-- </form> -->
</div>
</body>
<script>
$('#btn').click(function(){
	var images = new Array()
	var img = $('#thumbImages').find('img')
	if(!img.length){
		alert('没有上传')
		return false
	}
	//console.log(img.length)
	for(i=0;i<img.length;i++){
		images[i] = img[i].src
	}
	$.post('rec_images.php' , {'src':images} , function(data){
	})
})
</script>
</html>